<html>
<script type="text/javascript" src="./newpublic/js/jquery.min.js"></script>
<script>
/*   $.ajax({
    async : false,
    type: "GET",
    url: "http://127.0.0.1:12340/userLogin",
    data: {
      username: 'pwd',
      password: 'pwd'
    },
    timeout : 5000,
    dataType: "jsonp",
    jsonp : 'callback',
    success: function(data) {
      console.log('success')
      console.log(data)
    },
    error: function(msg) {
      console.log('error')
      console.log(msg)
    }
  })

 $.ajax({
  	async : false,
  	url : 'http://127.0.0.1:12340/userLogin',
  	type : "GET",
  	dataType : 'jsonp',
  	jsonp : 'callback',
  	data : {
  		q : '参数,不多说'
  	},
  	timeout : 5000,
  	success : function(json, ) {
  		//客户端jquery预先定义好的callback函数,
  		//成功获取跨域服务器上的json数据后,会动态执行这个callback函数
      console.log('error')
      console.log(json)
  	}
  });*/
  $.get('http://192.0.0.1:12340/userLogin', {
    username: 'usr',
    password: '123'
  }, function(data, status) {
    console.log(data)
    console.log(status)
  }, 'json').error(function(xhr, errorText,errorType){
      console.log('error')
      console.log(xhr)
    console.log(errorText)
    console.log(errorType)
  })
</script>

</html>
